package calculator.operator;

public class ModOperator implements Operator{

    @Override
    public double doCal(double num1, double num2) {
        return num2 % num1;
    }

    @Override
    public int getPriority() {
        return Priority.PRIORITY_LOW;
    }

    @Override
    public boolean support(char c) {
        return c == '%';
    }

    @Override
    public String toString() {
        return "%";
    }
}
